package br.com.bestOffer.converters;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.FacesConverter;

import br.com.bestOffer.enumerator.TipoConector;

@FacesConverter(value="TipoConectorConverter")
public class TipoConectorConverter implements Converter{

	public Object getAsObject(FacesContext context, UIComponent ui, String value) {
		return Enum.valueOf(TipoConector.class, value);
	}

	public String getAsString(FacesContext context, UIComponent ui, Object value) {
		return value.toString();
	}

}
